package com.ls.lserp.modules.setting.dao;

import java.util.List;

import com.ls.lserp.common.persistence.CrudDao;
import com.ls.lserp.common.persistence.annotation.MyBatisDao;
import com.ls.lserp.modules.setting.entity.InventoryWarning;
import com.ls.lserp.modules.common.entity.UploadFile;
import com.ls.lserp.modules.job.entity.MaterialAlertEntity;


/**
  * @ClassName: InventoryWarningDao
  * @Description: 
  * 
  * @author 
  * @date 2017年2月27日 上午9:20:34
  *
  */

@MyBatisDao
public interface InventoryWarningDao extends CrudDao<InventoryWarning> {

	
	/**
	  * @Title: getByName
	  * @Description: 查重
	  * @param @param Material
	  * @param @return
	  * @return Material 
	  * @throws
	  */
	
	public InventoryWarning getByCode(InventoryWarning inventoryWarning);
	
	/**
	  * @Title: saveUploadFile
	  * @Description: 上传图片
	  * @param @param material
	  * @param @return
	  * @return int 
	  * @throws
	  */
	
	public int saveUploadFile(UploadFile  uploadFile);
	
    /**
      * @Title: searchFileId
      * @Description: 查询图片Id
      * @param @param material
      * @param @return
      * @return List<Material> 
      * @throws
      */
    
    public List<UploadFile> searchFileId(UploadFile  uploadFile);
    
    /**
     * @Title: getInventoryWarningInfo
     * @Description: 通过面料ID获取库存预警信息
     * @param @param inventoryWarning
     * @param @return
     * @return InventoryWarning
     * @throws
     */
    public InventoryWarning getInventoryWarningInfo(InventoryWarning inventoryWarning);
    
    /**
     * @Title: update
     * @Description: 更新
     * @param @param inventoryWarning
     * @throws
     */
    public int update(InventoryWarning inventoryWarning);
    
    /**
     * @Title: insert
     * @Description:新建
     * @param @param inventoryWarning
     * @throws
     */
    public int insert(InventoryWarning inventoryWarning);

    /**
     * @Title: findAllList
     * @Description:查询当天所有库存预警数据
     * @param @param inventoryWarning
     * @throws
     */
  	public List<InventoryWarning> findAllList(InventoryWarning inventoryWarning);
  	
  	/**
     * @Title: updateAlertStatus
     * @Description:更新库存预警状态
     * @param materialId
     * @param alertStatus
     * @throws
     */
  	public int updateAlertStatus(String materialId,String alertStatus,String oldAlertStatus);
}
